package cn.itcast.nems.studentrecord.dao.mapper;

import cn.itcast.nems.studentrecord.dao.entity.StudentRecordReceivable;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 应收明细;所有对学生的收款都走应收单 Mapper 接口
 * </p>
 *
 * @author liyong
 * @since 2023-11-30
 */
@Mapper
public interface StudentRecordReceivableMapper extends BaseMapper<StudentRecordReceivable> {

    /**
     * 根据学籍及凭单信息查询应收明细ID
     *
     * @param studentRecordId 学籍ID
     * @param referenceType   凭单类型
     * @param referenceId     凭单ID
     * @param referenceLineId 凭单行ID
     * @return 应收明细ID，如果不存在返回null
     */
    Long selectId(@Param("studentRecordId") String studentRecordId,
                  @Param("referenceType") String referenceType,
                  @Param("referenceId") String referenceId,
                  @Param("referenceLineId") String referenceLineId);
}
